<div id="main_content">
	<h3><?php echo $this->lang->line('spl__Title'); ?></h3>
    <a href="<?php echo base_url();?>salary-parameter/add" class="new_regis"><?php echo $this->lang->line('MC007'); ?></a>
    <div class="table_list">
		
    	<table border="0"  class="list_view_data" cellpadding="0" cellspacing="0" width="100%">
            <tr align="center">
                <th><?php echo $this->lang->line('spl__no'); ?></th>
                <th><?php echo $this->lang->line('spl__ApplyDate'); ?></th>
                <th><?php echo $this->lang->line('spl__TrialPeriodRate'); ?></th>
                <th><?php echo $this->lang->line('spl__WeekdayOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__WeekdayLateOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__WeekendOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__WeekendLateOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__HolidayOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__HolidayLateOvertimeRate'); ?></th>
                <th><?php echo $this->lang->line('spl__SocialInsuranceRate'); ?></th>
                <th><?php echo $this->lang->line('spl__MedicalInsuranceRate'); ?></th>
                <th><?php echo $this->lang->line('spl__UnemploymentInsuranceRate'); ?></th>  
                <th><?php echo $this->lang->line('spl__Action'); ?></th>                                
                <th><?php echo $this->lang->line('spl__Delete'); ?></th>
            </tr>
            <?php $count = $page + 1; ?>
          <?php  foreach($data as $row){ 
              $path=($row['Del_Flag']==0) ? base_url()."public/sites/images/check-icon.png" : base_url()."public/sites/images/uncheck.gif";
              ?>  
            <tr>
            	<td align="center"><?php echo $count++; ?></td>
                <td align="center"><?php echo date('Y/m',strtotime($row['ApplyDate'])); ?></td>
                <td align="center"><?php echo number_format($row['TrialPeriodRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['WeekdayOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['WeekdayLateOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['WeekendOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['WeekendLateOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['HolidayOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['HolidayLateOvertimeRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['SocialInsuranceRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['MedicalInsuranceRate']*100,2, '.', ',') ?></td>
                <td align="center"><?php echo number_format($row['UnemploymentInsuranceRate']*100,2, '.', ',') ?></td>
                <td align="center"><a class="SalaryParameterID" rel="<?php echo $row['Id'] ?>" href="javascript:void(0);"><img src="<?php echo base_url();?>public/sites/images/Pencil.png" width="15" /></a></td>
                <td align="center"><img src="<?php echo $path;?>"/></td>
            </tr>
            <?php  } ?>           
        </table>
         <label for='disabledSelect'> <?php echo $messsageError; ?></label>
    </div>
    <div class="h_pagination">
        <?php echo $pagination;  ?>
    </div>
</div>

<form id="frmCompanyCode" action="<?php echo base_url();?>salary-parameter/edit" Method="POST">
  <input type="hidden" id="hidSalaryParameterID" name="hidSalaryParameterID">  
</form>

<script>
$( ".SalaryParameterID" ).click(function() {     
     $('#hidSalaryParameterID').val($(this).attr('rel'));
     $( "#frmCompanyCode" ).submit();
});
</script>